package com.fBlog.pojo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity  
@Table(name="talPhoto") 
@DynamicInsert(true)
@DynamicUpdate(true)
public class Talphoto implements java.io.Serializable{
	
	
	private String id;

	//所属用户
	private Tuser user;

	//相册代码
	private String code;

	//创建时间
	private Date createTime;

	//相册名称
	private String name;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USERID")
	public Tuser getUser() {
		return user;
	}

	public void setUser(Tuser user) {
		this.user = user;
	}
	@Column(length = 2550)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(length = 2550)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Id
	@Column(name = "ID", nullable = false, length = 36)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}

